import { S } from '../../s';
import { IPSAppUtil } from './ipsapp-util';
import { IPSSysPFPlugin } from '../../res/ipssys-pfplugin';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSAppUtilImpl extends PSModelObjectImpl implements IPSAppUtil {
  get codeName(): string {
    return this.M.codeName;
  }

  protected pssyspfplugin: IPSSysPFPlugin;
  getPSSysPFPlugin(): IPSSysPFPlugin | null {
    return (
      this.pssyspfplugin ||
      (this.pssyspfplugin = this.fillObjectModel(
        S._27c,
        this.M.getPSSysPFPlugin,
        S._2a7,
      ) as IPSSysPFPlugin)
    );
  }

  get utilPSDE10Name(): string {
    return this.M.utilPSDE10Name;
  }

  get utilPSDE2Name(): string {
    return this.M.utilPSDE2Name;
  }

  get utilPSDE3Name(): string {
    return this.M.utilPSDE3Name;
  }

  get utilPSDE4Name(): string {
    return this.M.utilPSDE4Name;
  }

  get utilPSDE5Name(): string {
    return this.M.utilPSDE5Name;
  }

  get utilPSDE6Name(): string {
    return this.M.utilPSDE6Name;
  }

  get utilPSDE7Name(): string {
    return this.M.utilPSDE7Name;
  }

  get utilPSDE8Name(): string {
    return this.M.utilPSDE8Name;
  }

  get utilPSDE9Name(): string {
    return this.M.utilPSDE9Name;
  }

  get utilPSDEName(): string {
    return this.M.utilPSDEName;
  }

  get utilTag(): string {
    return this.M.utilTag;
  }

  get utilType():
    | 'FILTERSTORAGE'
    | 'DYNADASHBOARD'
    | 'DYNACHART'
    | 'DYNAREPORT'
    | 'DRAFTSTORAGE'
    | 'USER' {
    return this.M.utilType;
  }
  get cls(): string {
    return 'PSAppUtilImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._15) return true;
    return super.instanceof(cls);
  }
}
